package com.gsabs.ihm;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;

public class GuiTools {

	public  static  Dimension getDimScreen() {
		Toolkit tk = Toolkit.getDefaultToolkit();
		return tk.getScreenSize();

	}

	public static void setLookAndFeel(String pLandFName) {

		// Changer le L&F
		LookAndFeelInfo LF[];
		LF = UIManager.getInstalledLookAndFeels();
		
		for (LookAndFeelInfo lf : LF) {
			
			
			System.out.println(lf.getName());
			
			if (pLandFName.equals(lf.getName())) {
				try {
					UIManager.setLookAndFeel(lf.getClassName());
					break;
				} catch (Exception ex) {

				}
				break;
			}
		}

	}
}
